function getHashVars() {
    var ret = {};
    var fields = window.location.hash.slice(1).split('&');
    for (var i in fields) {
        var field = fields[i].split('=');
        if (field[1] === undefined) { field[1] = null; }
        ret[field[0]] = field[1];
    }
    return ret;
}
